// mock/banner.js
import Mock from "mockjs";

// 生成随机轮播图数据
const banners = Mock.mock({
  image: function () {
    // 使用 Mock.js 生成随机图片，宽高比适合轮播图
    return Mock.Random.image(
      "350x750",
      Mock.Random.color(),
      "#FFF",
      "png",
      "夏日狂欢"
    );
  },
});
// 获取所有轮播图
Mock.mock("/api/banners", "get", () => {
  return {
    code: 200,
    message: "获取轮播图列表成功",
    data: banners,
  };
});
// console.log(banners);
